import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    collapse: false,
    myDate: '',
  },
  getters: {
  },
  mutations: {
    increment(state) {
      state.collapse = !state.collapse;
    },
    updateMyDate(state, newDate) {
      state.myDate = newDate;
    }
  },
  actions: {
    handcollapse({ commit }) {
      commit('increment');
    },
    updateMyDate({ commit }, newDate) {
      commit('updateMyDate', newDate);
    }
  },
  modules: {
  }
})
